package com.artron.mediaartron.data.entity;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Created by qi on 2017/12/11.
 */

public class CouponData implements Parcelable {

    /**
     * pageTotal : 8
     * coupons : [{"couponName":"tian-框画-300新","prefeAmount":300,"validStartDate":"2017-03-21","validEndDate":"2017-11-23","prefeType":"dixian","viewStatus":"ok","couponCode":"HEbKYq9D08k7","productType":"all"}]
     * couponList : [{"viewEnabled":"1","couponName":"tian-框画-300新","prefeAmount":300,"validStartDate":"2017-03-21","validEndDate":"2017-11-23","prefeType":"dixian","couponCode":"HEbKYq9D08k7","productType":"all"}]
     * pageNo : 1
     * recordCount : 75
     * pageSize : 10
     */
    private int pageTotal;
    private List<Coupon> coupons;
    private List<Coupon> couponList;
    private int pageNo;
    private int recordCount;
    private int pageSize;



    public void setPageTotal(int pageTotal) {
        this.pageTotal = pageTotal;
    }

    public void setCoupons(List<Coupon> coupons) {
        this.coupons = coupons;
    }

    public void setCouponList(List<Coupon> couponList) {
        this.couponList = couponList;
    }

    public void setPageNo(int pageNo) {
        this.pageNo = pageNo;
    }

    public void setRecordCount(int recordCount) {
        this.recordCount = recordCount;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getPageTotal() {
        return pageTotal;
    }

    public List<Coupon> getCoupons() {
        return coupons;
    }

    public List<Coupon> getCouponList() {
        return couponList;
    }

    public int getPageNo() {
        return pageNo;
    }

    public int getRecordCount() {
        return recordCount;
    }

    public int getPageSize() {
        return pageSize;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.pageTotal);
        dest.writeTypedList(this.coupons);
        dest.writeTypedList(this.couponList);
        dest.writeInt(this.pageNo);
        dest.writeInt(this.recordCount);
        dest.writeInt(this.pageSize);
    }

    public CouponData() {
    }

    protected CouponData(Parcel in) {
        this.pageTotal = in.readInt();
        this.coupons = in.createTypedArrayList(Coupon.CREATOR);
        this.couponList = in.createTypedArrayList(Coupon.CREATOR);
        this.pageNo = in.readInt();
        this.recordCount = in.readInt();
        this.pageSize = in.readInt();
    }

    public static final Parcelable.Creator<CouponData> CREATOR = new Parcelable.Creator<CouponData>() {
        @Override
        public CouponData createFromParcel(Parcel source) {
            return new CouponData(source);
        }

        @Override
        public CouponData[] newArray(int size) {
            return new CouponData[size];
        }
    };
}
